import { Base } from "./base";

export class Logger extends Base {
  private _level: string
  constructor(level: string) {
    super()
    this._level = level
  }

  log(...args: any[]) {
    this._level === 'trace' && console.log(...args)
  }

  warn(...args: any[]) {
    ['info', 'trace'].includes(this._level) && console.warn(...args)
  }

  error(...args: any[]) {
    console.error(...args)
  }

}